package com.lastproject.ejb.dao;

import com.lastproject.ejb.interceptors.PermissionInterceptor;

import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.interceptor.Interceptors;

import annotations.PermissionAnnotation;

/**
 * Session Bean implementation class MyBean
 */
@Stateless
public class CheckPermissionDAO implements CheckPermissionDAORemote {

	/**
	 * Default constructor.
	 */
	public CheckPermissionDAO() {
		
	}
	
	
	
	
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canOpenGeneralReports = 1)
	@Override
	public boolean hasOpenGeneralReportsRights (Boolean hasPermission){
		
		return hasPermission;
	}
	
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canCreateGeneralReports = 1)
	@Override
	public boolean hasCreateGeneralReportsRights (Boolean hasPermission){
		
		return hasPermission;
	}
	
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canOpenConfidentialReports = 1)
	@Override
	public boolean hasOpenConfidentialReportsRights (Boolean hasPermission){
		
		return hasPermission;
	}
		
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canCreateConfidentialReports = 1)
	@Override
	public boolean hasCreateConfidentialReportsRights (Boolean hasPermission){
		
		return hasPermission;
	}
	
	
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canCRUDOnEmployeesConfidential = 1)
	@Override
	public boolean hasEmployeeManagementRights (Boolean hasPermission){
		
		return hasPermission;
	}
	
	
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canCRUDOnEmployees = 1)
	@Override
	public boolean hasCrudOnEmployeesRights (Boolean hasPermission){
		
		return hasPermission;
	}
	
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canCRUDOnEmployeesByDepartment = 1)
	@Override
	public boolean hasCrudOnEmployeesByDepartmentRights (Boolean hasPermission){
		
		return hasPermission;
	}
	
	
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canCRUDOnCandidate = 1)
	@Override
	public boolean hasCandidateManagementRights (Boolean hasPermission){
		
		return hasPermission;
	}
	
	
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canCRUDOnEmployeesByDepartment=1)
	@Override
	public boolean hasDepartmentManagementRights (Boolean hasPermission){
		
		return hasPermission;
	}
	
	
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canCRUDOnEmployeesByTeam=1)
	@Override
	public boolean hasTeamManagementRights (Boolean hasPermission){
		
		return hasPermission;
	}
	
	
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canCRUDOnEmployeesConfidential=1)
	@Override
	public boolean hasAccountingRights (Boolean hasPermission){
		
		return hasPermission;
	}
	
	
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canAccessLibrary = 1)
	@Override
	public boolean hasLibraryManagementRights (Boolean hasPermission){
		return hasPermission;
	}
	
	
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canCRUDOnBooks = 1)
	@Override
	public boolean hasLibraryRights (Boolean hasPermission){
		return hasPermission;
	}
	
	@Interceptors(PermissionInterceptor.class)
	@PermissionAnnotation(canCreateQuiz=1)
	@Override
	public boolean hasSurveyManagementRights (Boolean hasPermission){
		
		return hasPermission;
	}



	
	
}
